module CSA(
    input   logic [2:0] in,
    output  logic       s,
    output  logic       c
);
    assign s = in[0] ^ in[1] ^ in[2];
    assign c = in[0] & in[1] | in[1] & in[2] | in[2] & in[0];
endmodule //CSA
